<?php
namespace app\api\controller;

use app\api\controller;


class Redpacket extends Base
{   
     
    //每日红包
    public function redpacket_list(){
         //用户的红包
        $Redpacket = model('redpacket');

        $data['list'] = array();
        //用户红包list
        if($data['list'] = $Redpacket->getUserRedpacketList($this->userId)){
	        foreach ($data['list'] as $key => $val) {
	            $data['list'][$key]['use_time'] = $data['list'][$key]['use_time'] == 0 ? 0 : date('Y-m-d H:i',$data['list'][$key]['use_time']);
	        }
        }
       
        $this->success("请求成功!", $data);
    }
}